package com.producer.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author astupidcoder
 * @since 2021-04-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("t_goods")
public class Goods extends Model {

    private static final long serialVersionUID = 1L;
    @TableId(type= IdType.AUTO)
    private Long id;

    /**
     * 商品名称
     */
    private String name;

    /**
     * 库存
     */
    private Integer goodsCount;

    /**
     * 测试字段
     */
    private String top;

    /**
     * 浏览量
     */
    private Integer viewCount;

    /**
     *  d得分
     */
    private Integer grades;


    public Goods(Long id, Integer viewCount) {
        this.id = id;
        this.viewCount = viewCount;
    }

    public Goods(Long id, String name, Integer goodsCount, String top, Integer viewCount, Integer grades) {
        this.id = id;
        this.name = name;
        this.goodsCount = goodsCount;
        this.top = top;
        this.viewCount = viewCount;
        this.grades = grades;
    }

    public Goods() {
    }
}
